package homework.day07.bean;

/**
 * @author ThinkBook
 */
public class Truck extends Automobile{
    private String brand;
    private String plateNumber;
    private String size;
    private int amount;
    public Truck(String brand,String plateNumber,String size){
        super(brand,plateNumber,size);
        this.size = size;
        this.brand = brand;
        this.plateNumber = plateNumber;
    }
    @Override
    public int getRent(int day){
        if (this.size == "大型"){
            amount = day*500;
        }else if (this.size == "中型"){
            amount = day*350;
        }else if (this.size == "小型"){
            amount = day*300;
        }
        return amount;
    }

}
